<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>电影详情</title>

    <!-- Bootstrap core CSS -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="../../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
    <link href="jumbotron.css" rel="stylesheet">
    <link rel="stylesheet" href="\stylesheets\details.css">
    <script src="../../assets/js/ie-emulation-modes-warning.js"></script>
    <style>
        .container img {
            width: 100px;
            height: auto;
        }
    </style>
</head>

<body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <!--<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>-->
                <a class="navbar-brand" href="#">电影详情</a>

                <a class="navbar-brand" href="/">首页</a>
            </div>
            <!--<div id="navbar" class="navbar-collapse collapse">
          <form class="navbar-form navbar-right">
            <div class="form-group">
              <input type="text" placeholder="Email" class="form-control">
            </div>
            <div class="form-group">
              <input type="password" placeholder="Password" class="form-control">
            </div>
            <button type="submit" class="btn btn-success">Sign in</button>
          </form>
        </div>-->
        </div>
    </nav>

    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron">
        <div class="row det">
            <div class="col-sm-6 col-md-6">
                <div class="thumbnail">
                    <img src="<%= det.images.large %>" alt="...">

                    <h3>
                        <%= det.title %>
                    </h3>

                </div>
            </div>
            <div class="col-sm-6 col-md-6">
                <div class="thumbnail">
                    <div class="caption">
                        <ul class="introduce">
                            <li>导演：
                                <a href="<%= det.directors[0].alt %>">
                                    <%= det.directors[0].name %>
                                </a>
                            </li>
                            <li>类型：
                                <%for(var i=0;i<det.genres.length;i++){%>
                                    <%= det.genres[i] %>&nbsp;&nbsp;
                                        <%}%>

                            </li>
                            <li>
                                主演：
                                <%for(var i=0;i<det.casts.length;i++){%>
                                    <a href="<%= det.casts[i].alt %>">
                                        <%= det.casts[i].name %>
                                    </a>/
                                    <%}%>
                            </li>
                            <li>上映年份：
                                <%= det.year %>
                            </li>
                            <!--<li><img src="<%= det.images.small %>" alt=""></li>-->
                            <button type="button" class="btn btn-default btn-lg">
                <span class="glyphicon glyphicon-star" aria-hidden="true"></span> Star
              </button>
                            <button type="button" class="btn btn-default btn-lg">
                <a href="/comment?id=<%= det.id%>" class="comment">评论影片</a> 
              </button>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <% if(list) {%>
            <% list.forEach(function(item,index){%>
                <div style="margin-bottom:10px;" class="media">
                    <div class="media-left media-middle">
                        <a href="#">
                            <%= (index+1) %>:
                        </a>
                    </div>
                    <div class="media-body">
                        <h4 class="media-heading">
                            <Middle aligned media>
                                <%= item.title %>
                        </h4>
                        <p>
                            <%- item.content %>
                        </p>
                    </div>
                </div>
                <%})%>
                    <%}%>
                        <a href="./details?pageNo=<%= pageNo > 1 ?  parseInt(pageNo)-1: 1 %>&id=<%=det.id%>">上一页</a>
                        <a href="./details?pageNo=<%= pageNo< totalPages ? parseInt(pageNo)+1: totalPages%>&id=<%=det.id%>">下一页</a>
                        <a href="./details?pageNo=<%= totalPages%>&id=<%=det.id%>">末页</a>
                        <%= pageNo %> /
                            <%= totalPages%> 共
                                <%= count %>条记录
                                    <hr>

                                    <footer>
                                        <p>&copy; 2016 Company, Inc.</p>
                                    </footer>
    </div>
    <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script>
        window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')
    </script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body>

</html>